/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package user_interface;

import javax.swing.JOptionPane;


/**
 *
 * @author Miss you
 */
public class Trangchu extends javax.swing.JFrame {
    QuanTri_UI ui1 = new QuanTri_UI();
    ThanhVien_UI ui2 = new ThanhVien_UI();
    ConDau_UI ui3= new ConDau_UI();
    GioiThieu_UI ui4 = new GioiThieu_UI();
    public Trangchu() {
        initComponents();
    }

    /**
     * This method is called from within the constructor to initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is always
     * regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jPanel1 = new javax.swing.JPanel();
        btnquanlythanhvien = new javax.swing.JButton();
        btnketxuatthongke = new javax.swing.JButton();
        btnThoat = new javax.swing.JButton();
        btnGioiThieu = new javax.swing.JButton();
        jLabel4 = new javax.swing.JLabel();
        jLabel5 = new javax.swing.JLabel();
        btnquanlythanhvien1 = new javax.swing.JButton();

        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

        jPanel1.setBackground(new java.awt.Color(237, 241, 129));
        jPanel1.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(255, 204, 0), 4, true));
        jPanel1.setForeground(new java.awt.Color(200, 200, 131));

        btnquanlythanhvien.setBackground(new java.awt.Color(255, 255, 255));
        btnquanlythanhvien.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/folder.gif"))); // NOI18N
        btnquanlythanhvien.setText("Quản lý thành viên trong Họ");
        btnquanlythanhvien.setToolTipText("");
        btnquanlythanhvien.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnquanlythanhvienMouseClicked(evt);
            }
        });
        btnquanlythanhvien.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnquanlythanhvienActionPerformed(evt);
            }
        });

        btnketxuatthongke.setBackground(new java.awt.Color(255, 255, 255));
        btnketxuatthongke.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/file.gif"))); // NOI18N
        btnketxuatthongke.setText("Kết xuất thống kê");
        btnketxuatthongke.setToolTipText("");
        btnketxuatthongke.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnketxuatthongkeMouseClicked(evt);
            }
        });
        btnketxuatthongke.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnketxuatthongkeActionPerformed(evt);
            }
        });

        btnThoat.setBackground(new java.awt.Color(255, 255, 255));
        btnThoat.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/btnExit.png"))); // NOI18N
        btnThoat.setText("Thoát");
        btnThoat.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnThoatActionPerformed(evt);
            }
        });

        btnGioiThieu.setBackground(new java.awt.Color(255, 255, 255));
        btnGioiThieu.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/btnAbout.png"))); // NOI18N
        btnGioiThieu.setText("Giới thiệu");
        btnGioiThieu.setToolTipText("");
        btnGioiThieu.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnGioiThieuMouseClicked(evt);
            }
        });
        btnGioiThieu.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnGioiThieuActionPerformed(evt);
            }
        });

        jLabel4.setFont(new java.awt.Font("Times New Roman", 1, 48)); // NOI18N
        jLabel4.setText("                 GIA PHẢ DÒNG TỘC");

        jLabel5.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/logogiapha.jpg"))); // NOI18N
        jLabel5.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0), 4));

        btnquanlythanhvien1.setBackground(new java.awt.Color(255, 255, 255));
        btnquanlythanhvien1.setIcon(new javax.swing.ImageIcon(getClass().getResource("/Image/folder.gif"))); // NOI18N
        btnquanlythanhvien1.setText("Quản lý thành viên con dâu trong Họ");
        btnquanlythanhvien1.setToolTipText("");
        btnquanlythanhvien1.addMouseListener(new java.awt.event.MouseAdapter() {
            public void mouseClicked(java.awt.event.MouseEvent evt) {
                btnquanlythanhvien1MouseClicked(evt);
            }
        });
        btnquanlythanhvien1.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                btnquanlythanhvien1ActionPerformed(evt);
            }
        });

        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
        jPanel1.setLayout(jPanel1Layout);
        jPanel1Layout.setHorizontalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(301, 301, 301)
                        .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 849, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(20, 20, 20)
                        .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(btnquanlythanhvien1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnquanlythanhvien, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnketxuatthongke, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnGioiThieu, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(btnThoat, javax.swing.GroupLayout.PREFERRED_SIZE, 254, javax.swing.GroupLayout.PREFERRED_SIZE))
                        .addGap(18, 18, 18)
                        .addComponent(jLabel5, javax.swing.GroupLayout.PREFERRED_SIZE, 907, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(861, Short.MAX_VALUE))
        );
        jPanel1Layout.setVerticalGroup(
            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup()
                .addGap(19, 19, 19)
                .addComponent(jLabel4, javax.swing.GroupLayout.PREFERRED_SIZE, 86, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(18, 18, 18)
                        .addComponent(jLabel5))
                    .addGroup(jPanel1Layout.createSequentialGroup()
                        .addGap(90, 90, 90)
                        .addComponent(btnquanlythanhvien, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(btnquanlythanhvien1, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(29, 29, 29)
                        .addComponent(btnketxuatthongke, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(btnGioiThieu, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)
                        .addGap(30, 30, 30)
                        .addComponent(btnThoat, javax.swing.GroupLayout.PREFERRED_SIZE, 49, javax.swing.GroupLayout.PREFERRED_SIZE)))
                .addContainerGap(460, Short.MAX_VALUE))
        );

        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
        getContentPane().setLayout(layout);
        layout.setHorizontalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap())
        );
        layout.setVerticalGroup(
            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                .addContainerGap()
                .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                .addContainerGap(130, Short.MAX_VALUE))
        );

        pack();
    }// </editor-fold>//GEN-END:initComponents

    private void btnquanlythanhvienActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnquanlythanhvienActionPerformed
        // TODO add your handling code here:
        ThanhVien_UI frmThanhVien= new ThanhVien_UI();
        frmThanhVien.setVisible(true);
//        ui2.setVisible(false);
//        ui3.setVisible(false);
//        ui4.setVisible(false);
    }//GEN-LAST:event_btnquanlythanhvienActionPerformed

    private void btnquanlythanhvienMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnquanlythanhvienMouseClicked
//        LoaiDungCu_UI cv= new LoaiDungCu_UI();
//        cv.setVisible(true);
    }//GEN-LAST:event_btnquanlythanhvienMouseClicked

    private void btnketxuatthongkeActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnketxuatthongkeActionPerformed
        // TODO add your handling code here:
        KetXuat_UI frmThanhVien= new KetXuat_UI();
        frmThanhVien.setVisible(true);
//        ui1.setVisible(false);
//        ui2.setVisible(false);
//        ui3.setVisible(true);
//        ui4.setVisible(false);
    }//GEN-LAST:event_btnketxuatthongkeActionPerformed

    private void btnketxuatthongkeMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnketxuatthongkeMouseClicked
//        MuonTra_UI cv= new MuonTra_UI();
//        cv.setVisible(true);
    }//GEN-LAST:event_btnketxuatthongkeMouseClicked

    private void btnThoatActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnThoatActionPerformed
        int dialogResult = JOptionPane.showConfirmDialog(this, "Bạn muốn thoát chương trình ko?", "Gia hệ dòng họ",JOptionPane.YES_NO_OPTION);
        if(dialogResult==0){
          System.exit(0);
        }
    }//GEN-LAST:event_btnThoatActionPerformed

    private void btnGioiThieuActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnGioiThieuActionPerformed
        GioiThieu_UI frmGioiThieu= new GioiThieu_UI();
        frmGioiThieu.setVisible(true);
    }//GEN-LAST:event_btnGioiThieuActionPerformed

    private void btnGioiThieuMouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnGioiThieuMouseClicked
        
    }//GEN-LAST:event_btnGioiThieuMouseClicked

    private void btnquanlythanhvien1MouseClicked(java.awt.event.MouseEvent evt) {//GEN-FIRST:event_btnquanlythanhvien1MouseClicked
        // TODO add your handling code here:
    }//GEN-LAST:event_btnquanlythanhvien1MouseClicked

    private void btnquanlythanhvien1ActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_btnquanlythanhvien1ActionPerformed
        // TODO add your handling code here:
        ConDau_UI frmConDau= new ConDau_UI();
        frmConDau.setVisible(true);
    }//GEN-LAST:event_btnquanlythanhvien1ActionPerformed

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        /*
         * Set the Nimbus look and feel
         */
        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
        /*
         * If Nimbus (introduced in Java SE 6) is not available, stay with the
         * default look and feel. For details see
         * http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html
         */
        try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        } catch (ClassNotFoundException | InstantiationException | IllegalAccessException | javax.swing.UnsupportedLookAndFeelException ex) {
            java.util.logging.Logger.getLogger(Trangchu.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
        }
        //</editor-fold>

        /*
         * Create and display the form
         */
        java.awt.EventQueue.invokeLater(new Runnable() {

            @Override
            public void run() {
                new Trangchu().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JButton btnGioiThieu;
    private javax.swing.JButton btnThoat;
    private javax.swing.JButton btnketxuatthongke;
    private javax.swing.JButton btnquanlythanhvien;
    private javax.swing.JButton btnquanlythanhvien1;
    private javax.swing.JLabel jLabel4;
    private javax.swing.JLabel jLabel5;
    private javax.swing.JPanel jPanel1;
    // End of variables declaration//GEN-END:variables
}
